package com.gitee.feizns.quickstart.web.spring.boot.autoconfigure.restful;

import com.gitee.feizns.quickstart.web.restful.RestExecutor;
import com.gitee.feizns.quickstart.web.restful.Rests;
import com.gitee.feizns.quickstart.web.restful.UnSupportRestExecutor;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;

/**
 * 快速入门 Web Restful 自动配置
 * @author feizns
 * @since 2024/10/10
 */
@AutoConfiguration
public class QuickstartRestfulAutoConfiguration {

    /**
     * REST ful 工具
     * @return {@link Rests}
     */
    @Bean
    @ConditionalOnMissingBean
    public Rests rests() {
        return new Rests();
    }

    /**
     * un support restful service executor
     * @return {@link RestExecutor}
     */
    @Bean
    @ConditionalOnMissingBean
    public RestExecutor unSupportRestfulServiceExecutor() {
        return new UnSupportRestExecutor();
    }

}
